/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class CreateCandidatosVEPDSData {
	public void createTestData() throws PersistentException {
		PersistentTransaction t = orm_candidatos.CandidatosVEPDSPersistentManager.instance().getSession().beginTransaction();
		try {
			orm_candidatos.Candidatos lorm_candidatosCandidatos = orm_candidatos.CandidatosDAO.createCandidatos();
			// TODO Initialize the properties of the persistent object here, the following properties must be initialized before saving : votos, run, nombre
			orm_candidatos.CandidatosDAO.save(lorm_candidatosCandidatos);
			t.commit();
		}
		catch (Exception e) {
			t.rollback();
		}
		
	}
	
	public static void main(String[] args) {
		try {
			CreateCandidatosVEPDSData createCandidatosVEPDSData = new CreateCandidatosVEPDSData();
			try {
				createCandidatosVEPDSData.createTestData();
			}
			finally {
				orm_candidatos.CandidatosVEPDSPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
